Skip to content

Conversation

@davidbrochart
Copy link
Contributor

@davidbrochart davidbrochart commented Jun 24, 2021

It looks like the call to nbconvert's get_exporter function is not thread-safe:

exporter_class = await run_sync(base.get_exporter, exporter_name)

And I can see that JupyterLab makes multiple concurrent requests to /api/nbconvert. This PR works around that issue using a lock.

Fixes jupyterlab/jupyterlab#10442

@codecov-commenter
Copy link

codecov-commenter commented Jun 24, 2021

Codecov Report

Merging #545 (1baa5ba) into master (450010e) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #545      +/-   ##
==========================================
- Coverage   76.33%   76.32%   -0.02%     
==========================================
  Files         110      110              
  Lines        9816     9819       +3     
  Branches     1067     1067              
==========================================
+ Hits         7493     7494       +1     
- Misses       1943     1944       +1     
- Partials      380      381       +1     
Impacted Files Coverage Δ
jupyter_server/services/nbconvert/handlers.py 83.33% <100.00%> (+2.38%) ⬆️
jupyter_server/services/kernels/kernelmanager.py 80.07% <0.00%> (-0.73%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 450010e...1baa5ba. Read the comment docs.

@blink1073 blink1073 added this to the 1.9 milestone Jun 24, 2021
@blink1073 blink1073 added the bug label Jun 24, 2021
@blink1073 blink1073 merged commit f712734 into jupyter-server:master Jun 24, 2021
Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JupyterLab hangs on server shut down

3 participants